remove faulty conditional in index