Fix for GUI bug