bug fix in qty