Added if condition for cookies[:location]