Fixing type-checking for the case of pointer differences.
Still some issues remain with pointer-arithmetic, to be fixed soon