Add missing $.
Fix change index sometimes not being int.