Fix #888, #890