More robust molecule construction