Fix exceptions and added a parameter name