Fixed memory allocation bug in Lanczos