Implemented missing code for issue #914

Implemented the missing code to resolve issue #914