NullPointer Exception fixed