Session_persistence: Random responses when storage set to 'session'

When I set storage to local, it displays all the previous chat history which I don’t need. But when I changed it to ‘session’ it displays random response from bot as initial load message and behaves oddly by responding irrelevantly to user question, but which works well with storage set to ‘local’.

Looks like I resolved it myself. Added localStorage.clear(); function at the end of script tag. And the random messages are now removed by changing ‘initPayload’:"/get_started" to my “utter_greet” message.