Need to check for != NULL here I think.