fixed errors reported by rat