Reverted to earlier code. Undefined bug to be fixed.