Fixed problem with clearing all tabs after clicking the "Cancel" button