Fix hung gridseed

Fix bug #501