some fixes and adaptions