Fix main page sorting