Changed command execution  order