Fix BUG #1536
Merge pull request #1545 from dreamsxin/1536_for_1.2.5

Fix BUG #1536 for 1.2.5