Bug fixed in modify window and main window