Avoid creating duplicate instances - fix #4.