Few checks to see where is the bug that kills the whole quasinewton class