fix comparing data