Fixed runtime errors associated with the changes made from commit:
692c5734cf04a27a0ce476eb67cae3c20407d2fc