fixing stroke duplication bug