fixed nil error on trades index