some fixes and style