Fixed a bug in NSGAIITemplate