fix scope method queries; fix rake tasks