solving bug