Fix bug in onEnable().