fixing bugs, coming from engine structure modification