Fixed potential null pointer