Fixed repeating entries bug, and page load

Had to fix query, and had left in earlier fix