bugfix for APIs #326

bugfix for APIs #326