some improvements & bugfixes