Fix merge detection