Fixed a possible NullPointer