Fixing changes reverted by pull request 148