js fixes for pillbox