added note trigger gen and fixed notes tag_id