Use mouseup when needed. Fix gist.