Corrections & updates to allow gate swap