fix for rails 4, fixes #11