Fixed Null pointers