nullpointerexception fixed