fixed determination of gui