fix to_h to include class name and safe_hash to not