bugfix: use siteId passed to function