debug and swat fixes from 3.0