Fix #888, #890
Fix #887