Fixed inverter layer bug