Fix issues with belongs_to_deleted in rails 4