fixed commit bug which was ending unmodified elements
removed debug output