fixed bug with configuration loading

Bad values in some fields could cause exceptions