fixed cpkg function call