Move matrix part after the env part