fix possible lockup