Fix batch command processing