misc bug fixes
working with errors