bugfix for cursor