A little null pointer exception fixed