Fixed Null Pointer Exception spot