fix bug life counting