added a control for params to avoid non-existent index calls