Fix NPE caused by the other fix