Fix gettype bug