fixed null pointer exception for errorsto + errorsto