Merged fix/contraction possible fix for #166