Fixed iteration bug caused by controller refactoring