Fixed Null pointer expection