fixes access to undefined objects