12.16.13 rewrite bugfixes