some fixes applied