Made command queue more logically designed and robust against server abscence.