fixed a gui bug that caused glitching

fixed a gui bug that caused glitching