fixed a bug in gui not drawing initial copied code