fixed the previous bug fix