Bugfix: Handle multiple instances correctly => use the last and current instance instead of the first