Bug correction
Use the new api in the gui