fix array comparison and custom comparison