fix negative indexing issue with modifiers