ensure deep to_h functionality