Fix Ctrl+Space bugs and trailing parenthesis bug