Fix some parsing issues with the prefs file