minor fix on an error path