fix: time remaining function returns negative value