Fixes error on generation of terminal sym. Cleanup.