* fix for termination logic