Optimise a little, support 26-bit machines correctly and fix check for