fixes a right click bug of #507