Minor loop improvement