random legacy api fixes