add index checking to prevent crash when highlighting cells