fixed refactor of register and registerGUI
/malte & mikael