Fixed Null

Fixed the annoying NullPointer at the beginning upon clicking a button.