BUG: Bug in boundary calculation + Unfortunately left out updates from previous commits.