fix to work correctly with no tag