Changed mouseup functionality