fixed javascript tool checkout handler