fixed bugs #1373, #2629, #2719

fixed bugs #1373, #2629, #2719 in the core module