Minor api fixes