Fixed #603 -- corrected a crash