The other point is: Did you type the square brackets? If you did, remove them.
By typing a square bracket, you create an Array, or Vector, and that is not a scalar.
You should NEVER type a square bracket to create a subset of an expression, Prime will change the look of ordinary (round) brackets to square if it sees fit to do so, but they will still be treated as round brackets, and that how you normally want them.
So if you typed the square brackets, remove them and replace them with round brackets if needed, but I guess Prime will put in round brackets automatically once you remove the squares.