rails 4 compatibility

fix for #2