remove duplicate frame (cooperative sort) + several minor fixes