fixed issues for custom devise scope