Note encoding fixes