added in fix so GUI works when switching back