gui now opens correctly