Fixed Lanczos memory leak