       _.max(migratedSetAsArray)
 
   currentMigration: ->
-    _.detect(@migrations(), (migration)=> migration.version() == @currentVersion())
+    _.detect(@migrations(), (migration)=> parseInt(migration.version()) == parseInt(@currentVersion()))
 
   currentMigrationIndex: ->
     index = _.indexOf(@migrations(), @currentMigration())

      runnable.filter(@ran.bind(@)).value()

  start: ->
    if @isUp() then 0 else (@currentMigrationIndex() || 0)

  finish: ->
    if _.isNumber(@targetMigrationIndex())
      @targetMigrationIndex() - 1
    else
      (@migrations().length - 1)
    
  isUp: ->
    @direction == 'up'

      
  runnable: ->
    start = @start()
    finish = @finish()
    migrations = @migrations()
    runnable = migrations.slice(start, finish)
    runnable = _(runnable)
    if @isUp
      runnable.reject(@ran.bind(@)).value()
