small bugs in wrapper