fix notes.js controller called twice problem