Fixed incorrect intence time computation and long scalars overflow error