rails 4 compat

a few changes for rails 4 compatibility