fixes error creation