Solving a small bug