Thanks calmon. Your map is slightly fuller than the ones I was testing with

.
I'll run it through the debugger and see what I can find. 35 and 28 border each other, there could be another bug with that. But I see the bug in 49 too, so I'll have a look.