Better handling of delete

Also fixes double delete for Chinese input