Attempt at debugging ~ partial success