Fixed config parsing, used variable i twice...