Fixed a queryset conversion to list bug.

Summary: Had a bug with query set not being converted to list and a crash on -1 indexing.

Test Plan: go to /problems.

Reviewers: bogdan2412

Reviewed By: bogdan2412

Differential Revision: http://phab.code4fun.de/D4