Corrected the order of gate resolution
Bug fix
Changed gate.controls argument to None for Rx/y/z and all the swap gates