Fixed a null pointer exception
Fixed a null pointer exception