Check for note_id==-1 in patch.c (edited in wrong branch)
Fix compilation