Fixed checking for primitive operations.