Reorganisation to fix problems related to the gct register variable