Minor bug fix cased of api change