Fixed confine so it would work as expected (cannot be inside set code block)