fixed command running out of order issue