Not my code here, just changed gridAABB to minimalGridAABB. Will change this anyway this evening