Fix double matrix