Fixed twitching bug
Added boundaries