fixed: undefined indexes