Fix NullPointerException of issue #238