fixed layer bug and mainwindow square sizes