Removed null pointer exception