fixed a small bug where errors would not display correctly