Ah... i think that is a bug with "fire at selected target" setting, i am sorry but that thing buggers me as well and i don't have a solution for that.
I am not sure if cannon turrets work with that setting, have to test that...
They should work fine with the "fire at anything" setting (that is...