Fixed bug in wrapper method