added api test for bug in #139