Fix bug 4678
Fix bug 4679