fix NullPointerException (issue #7)