Fix for indexRange