Refactory command and try to fix fly check