Not a bug, just from short distance it is extremely hard to snipe a module. It is not enough to hit the targeting rectangle, you need to hit absolutely spot on, using the micro gimballing feature. It works best on medium to long distances. I would therefore rather suggest the long range mod.
When you are on the targeted module, closely watch the tiny dots that indicate the point where they will strike. You will eventually see one of them making a tiny movement when it locks on the module. Only if you manage to make it fire at that precious moment, it will hit the module. And wreck it with a few shots - rail guns are extremely devastating weapons if mastered right. You will also notice that only one of your guns will ever hit the module, 'cause even at a distance the micro gimbal is not able to direct them all at the same spot.
o7