fixed index bug when creating GET request