Set properties to undefined instead of deleting them, which is slower and unnecessary here