bug fix for index.rp