I made a change in the code to not allow ram decoding to happen while DTACK is low. But I seem to be back to the STERM oddness again now

in theory , the cpu could read DTACK from the previous bus cycle and terminate the ram cycle, even before the cpu a actually gets STERM.. So a simple code change , and now its behaving like its not terminating the RAM cycle. YAARTTT just hangs if I try to access ram. STOS bizzarly chucks out a illegal instruction.
Even more odd, is that I don't let the CPU see DTACK on ram access later in the code anyway. So adding DTACK to the ram decoding line should not make any odds at all. If DTACK was low all the time the ram would never get decoded.. But that cant happen really anyway..
I'm out of ideas at this point. I'm pretty much at the door of thinking the xlinix compiler is flawed and something isn't running as it should
