small bug fix in wrapper