Fixed error message overwrite