some fixes and debug enablement