#145 avoid NPE