some fixes and additions