NullPointer bug fix
Buttons UP and Down check