I made all those mistakes the first year I started speaking English. But now, I'd never say 'a apple', the 'an apple' pattern has been built up, every time I think of 'apple', 'an' will pop up in front right away.
Totally agreed with lilac, linking definitely helps.