fixed ruby rehash