Fixed case of crashing when calculating datum point