Lost negative eigenvalues by fixing potential multiplicated.
Used abs instead of pow in check.
Fixed possible errors in step sizes.