bug fix from Usman Raza, many thanks!