fix pixel check