Fix detection for sorted action