Some minor fixes and improvements for the inplace code.