An attempt to fix this troubled javascript plugin