bugfixes (from BugSense)