Made JS compatible with Turbolinks, fixed order of activities recorded in same second