Added senity checking of config amount variable.