templates fix, debug mesages removed