Fixed collection js bug