fix 2 important bugs in configuration parsing