Major bugfixes

Fixed bugs with the configfile stuff