Index: cpp/frams/genetics/fL/fL_general.cpp
===================================================================
--- cpp/frams/genetics/fL/fL_general.cpp	(revision 797)
+++ cpp/frams/genetics/fL/fL_general.cpp	(revision 803)
@@ -73,5 +73,5 @@
 }
 
-bool fL_Builder::getNextObject(int &pos, SString src, SString &token)
+bool fL_Builder::getNextObject(int &pos, const SString &src, SString &token)
 {
 	// if position exceeds length then return false
@@ -130,5 +130,5 @@
 }
 
-std::string fL_Builder::trimSpaces(std::string data)
+std::string fL_Builder::trimSpaces(const std::string& data)
 {
 	size_t first = data.find_first_not_of(' ');
@@ -141,5 +141,5 @@
 }
 
-int fL_Builder::createWord(SString token, fL_Word *&word, int numparams, int begin, int end)
+int fL_Builder::createWord(const SString &token, fL_Word *&word, int numparams, int begin, int end)
 {
 	SString wordn;
@@ -229,5 +229,5 @@
 }
 
-int fL_Builder::tokenize(SString sequence, std::list<fL_Word *> &result, int numparams, int begin, int end)
+int fL_Builder::tokenize(const SString &sequence, std::list<fL_Word *> &result, int numparams, int begin, int end)
 {
 	int pos = 0;
@@ -450,5 +450,5 @@
 }
 
-int fL_Builder::processLine(fLElementType type, SString line, fL_Element *&obj, int linenumber, int begin, int end)
+int fL_Builder::processLine(fLElementType type, const SString &line, fL_Element *&obj, int linenumber, int begin, int end)
 {
 	ParamEntry *tab;
@@ -557,5 +557,5 @@
 }
 
-int fL_Builder::parseGenotype(SString genotype)
+int fL_Builder::parseGenotype(const SString &genotype)
 {
 	int pos = 0;
@@ -1303,5 +1303,5 @@
 			m->checkpoint();
 		}
-		if (maxwords != -1 && genotype.size() > (unsigned int)maxwords)
+		if (maxwords != -1 && ((int)genotype.size()) > maxwords)
 		{
 			wordsexceeded = true;
Index: cpp/frams/genetics/fL/fL_general.h
===================================================================
--- cpp/frams/genetics/fL/fL_general.h	(revision 797)
+++ cpp/frams/genetics/fL/fL_general.h	(revision 803)
@@ -315,5 +315,5 @@
 	 * @return string with trimmed spaces
 	 */
-	static std::string trimSpaces(std::string data);
+	static std::string trimSpaces(const std::string& data);
 
 	/**
@@ -328,5 +328,5 @@
 	 * @return 0 if processing ended successfully, 1-based position of error otherwise
 	 */
-	int processLine(fLElementType type, SString line, fL_Element *&obj, int linenumber, int begin, int end);
+	int processLine(fLElementType type, const SString &line, fL_Element *&obj, int linenumber, int begin, int end);
 
 	/**
@@ -343,5 +343,5 @@
 	 * @return 0 if processing finished successfully, 1-based position of error if it occured
 	 */
-	int parseGenotype(SString genotype);
+	int parseGenotype(const SString &genotype);
 
 	/**
@@ -365,5 +365,5 @@
 	 * @return true if new token is found, false if there is no more tokens or when there was parenthesis mismatch (if pos == -1, then it is parenthesis mismatch)
 	 */
-	bool getNextObject(int &pos, SString src, SString &token);
+	bool getNextObject(int &pos, const SString &src, SString &token);
 
 	/**
@@ -376,5 +376,5 @@
 	 * @return 0 if conversion went successfully, 1 when there is a problem with parsing
 	 */
-	int createWord(SString worddef, fL_Word *&word, int numparams, int begin, int end);
+	int createWord(const SString &worddef, fL_Word *&word, int numparams, int begin, int end);
 
 	/**
@@ -385,5 +385,5 @@
 	 * @return 0 if tokenizing finished successfully, 1 otherwise
 	 */
-	int tokenize(SString sequence, std::list<fL_Word *> &result, int numparams, int begin, int end);
+	int tokenize(const SString &sequence, std::list<fL_Word *> &result, int numparams, int begin, int end);
 
 	/**
@@ -452,5 +452,5 @@
 	 * @return pointer to the input neuron, or NULL if no neuron could be found
 	 */
-	Neuro *findInputNeuron(std::pair<std::list<fL_Word *>::iterator, Neuro *> currneu, fL_Word *attractor);
+	Neuro* findInputNeuron(std::pair<std::list<fL_Word *>::iterator, Neuro *> currneu, fL_Word *attractor);
 
 	/**
Index: cpp/frams/genetics/fL/fL_oper.cpp
===================================================================
--- cpp/frams/genetics/fL/fL_oper.cpp	(revision 797)
+++ cpp/frams/genetics/fL/fL_oper.cpp	(revision 803)
@@ -142,5 +142,5 @@
 			SString det;
 			NeuroClass *cls = getRandomNeuroClass();
-			if (!cls) cls = Neuro::getClass("N");
+			//we do not check if this class
 			det = cls->getName();
 			Geno_fH::mutateNeuronProperties(det);
@@ -202,5 +202,8 @@
 			return creature->words["S"];
 		case FL_ADD_NEURO:
-			return creature->words["N"];
+			if (getActiveNeuroClassCount() == 0)
+				return creature->words["S"];
+			else
+				return creature->words["N"];
 		case FL_ADD_CONN:
 			return creature->words["C"];
