bugfixes, glass improvements