Fixed Null Pointer Exception