Using apply() instead of commit() when working with shared preferences.