Fixed idx errors.