fixed previous bug by explicitly initializing the command buffer to 0