Minor api bugfix