fixes #1294
fixes #1294
Removing duplicated check.
Merge PR #1302 by @MarcinSc - dupe code fix