tried to fix NullPointerException

close but no cigar