fix the context of commanders
fix reference errors and context problems