Aligned with CM's stuff

Hope there's no side-effects