fix cursor rendering