bugfixes, slight prettification