fix for migration extension and fix for rails 4 compatibility