fix npe in issue #13
fix issue #13