Removed unnecessary NULL assignments (after unref), since they are guaranteed to NULL afterwards anyway.