fixed lucnh calculation and negative time issues