fixing some issues found when testing agains rails 4.1