Keep stride 512 logic unchanged