Fix NPE and property listener