bugfix and gate extensions