fixed bug for errros and added some labels