fix synchronization issue when starting shell