bugfix in hook_join