fix replace method
fix for _update to not assume cursor is defined