Fixed set_cursor and refresh_screen functionality.