Modified delta.m to try and make the network allways solve the problem if it's solvable. It seems to work, but no 100% guarante.