Fix and debug