fixed my little error. why didn't I check for NULL?