Tweaked to allow for better optimization when cloning