bug fix for comparison