fixed NPE reported by JeffM