Fixed bugs with commands