a possible fix for an NPE
fix for issue #134