0-indexed, and fix params error