null pointer corrected