Fixed implicit conversion to NULL warnings