[BUG] Fix erratic error output