make some fixes and little modifications