really fixed #117, more bugfixes