maybe fix NPE (see #49)