avoid NPE
fix #426