Fixed a FormatException and fixed toggling of flying