fixed issue where code was deleted causing note count to work incorrectly