Fix command exists check