Bugfix #691 changes