Fix some issues with rails
God I hate rails