Fix bug in os_dec_cursor