Fixed a big with to_switch from hashes