Bugfix the setup function