Fixed error message not appearing when not enough data. Also, main page not showing correctly