Fixed bug in containspoints method