fix superclass mismatch bugs introduced by rails 4
fix deprecations