Fix several issues raised after the merging with the 'variation' branch