Added null pointer exception