Fixed all manner of bugs caused by different dimensions