quick workaround for hanging in issue #60

This would ideally be fixed by wrapping everything in timeouts and handling those appropriately, but this works for now.