fix bug in importance sampling of UA.