Fixed GMM predict function