Fix custom chain creation (fixes #25)