fixed cursor bug