more fixes to rails