                 @_pos.x = to - _right._x
             else if @_bnd.shape is 'circle'
                 @_pos.x = to - @get 'radius'
-        else if what.match /^left$/
+        else if /^left$/.test what
             old = @get 'left', false if _emit
             if @_bnd.shape is 'polygon'
                 _left = @_bnd.points[0]


            #fire draw:after event
            @emit 'draw:after'
    _update: =>
        #fire update event
        @emit 'update'


        @_updateID?
    _start: ->
        @emit 'start'
        @_updateID = setInterval (=> @_update), 1000 / Greenhorn.config.frameRate
    _stop: ->
        @emit 'stop'
        clearInterval @_updateID
