bug fixes with comparison