working compile and fixed event manager initialization for motor controller