fix inPlace