moved get_attributes under the protected line