bugfix: use correct variable when checking commands

Signed-off-by: Zeljko <zeljko@zwr.fi>