added errors
fixed a typo