Random error fix in gui