fixes small bug in rerouting back to indices screen on modal close.