Sort the masters by id in index page