This is commit for code changes against issues 1230 and 1233