Bugfix for multiple instances