several hours spent on one small bug :(