A fix to prevent negative time when a negative acceleration and displacement are given.