Fixed some preferenceloader code