Trapped some particularly nasty cases where we get nans all over the place
Added some anti nan checks in diagonalisation routines
bugfix