Fixed server error. pet[:media] hash might return as empty hash