fixed a bug which caused wrong values to be read from configuration