Fixed a bug of type changing by double-click.