fix empty note bug
fix last note on main table bug