fixed #131: potential NPE