Fixed an error for sending wrong value for shared preferences