fix bug to check for empty note