fix history bug piranajs