Fix bug dim instead of d.