Final debug, all works now