some fixes and improves