bugfix for complexity sorting