Fixed some issues with ordering of releases from the database