[#1649] Faris : Fixed defect.
[#1668] Faris : Refactored.