fix conditional execution of commands in CI