fix slice comparison