Fix exceptions and comments