Made running of initial command asynchronous and fixed a bug