Fixed wrong events registered