bug fix for exception handling + docs