On the minimum mass ratio of W UMa binaries