* fix loop termination trouble