Potential NPE is fixed