Fix a bug, add faster construction

@ticoann please review. This faster method is needed for CRAB3 and the bug I turned up has been there a long time.