fix js conparison