fix bug with __index meta-method