Made some extra optimalisations to detect print area