Fixed an issue with websocket and running with main program