fixes a few bugs and improves logic tags