Changed config variable names and fixed a bug