Bug fix in the gui