Addressed #23, Updated changes in stable9 as well. Please review