Fix logic bug in index, which was previously fixed on live site