Fixed NullPointer Exception