Fixed error in assigning commands to slots