fixed blocking when window is not yet closed using the slots signals callbacks method