Fixed last bugs having to do with item removal while popup-windows are open.