fix bug with sorting frame indices as strings instead of numbers