Fixed more command related bugs