One problem solved, another appeared. Lots of debug printouts atm