Fixed NullPointerException
better format