fixed rare unrecoverable bug