bug fix: #1536: duplicate code removed