fixd null pointer exception