portal bundle factory finally working