quantity count now correct, fixes #6