some fixes and changes