Problems bouncing off walls

Ship gets stuck against boundary sometimes when it should bounce off.
Trying to figure that out.