fix saving resource_type
tiny fix