Update NLSsplitting.f90

Fixed bug, added variable declaration and fixed typo