added margin to errors