Added check so you don't register for the same class twice