Fixed nullpointer reported by user