minor adaptions and bug fixes