bug fixes

changed comparisons