Fixed Null Pointer Error