fixing previous bug