fixed #47, improved client-side quantity filtering