fixed couple bugs related to comparison operators