ATSrails_ added a fix after testing check_quantity method