Previously the code was too simple and potentially added points out of order, leading to automation jumping back in time.