Use at() method instead of [] method. Revert some changes not needed.