fix mgls_prepare1d