fixing key problem for rails keys