Added internal condition checks for adding points