Resolved a null pointer exception