Corrected a bug in output test compares function