second fix for the previous bug