issue #57 fixed NullPointerException