Bug fix: changed order