fixed ArgumentError in index-start/end