Fix NULL-pointer