Fix comparison of pi types