Solving a bug