Small minor bugfix in API