Shared preferences fix