Fix bug that was causing the view projects page to be very slow
bug fix