avoiding weird behaviour