Finally finding the solution for a bug