Use int type for index option for issue667