Yep, that usually happens when changing the gun from one end to another. See here for a solution:
http://www.subsim.com/radioroom/show...2&postcount=14
edit: Actually that seems to help you to replace a bow deck gun with a stern one, not to return lost slots. You can load an older savegame and move the gun using the procedure described in the post(You have to be in port to do that), or try this if you want to keep your current save:
1. Locate and BACKUP your ActiveUserPlayerUnits.upc in My Documents/SH4/data/cfg/SaveGames/0000000X. Replace X with the number of the savegame you want to edit. You have to be in port to do this.
2. See if the gun is installed in compartment 7(stern deck gun) or 8(bow deck gun). This is done by looking at
[UserPlayerUnit 1.Compartment X.WeaponSlot 1.Weapon]. Replace X with compartment number. When you find that line, look under it for a weapon ID. If there is one(something like 4in50calUS), then there's a weapon installed.
3. Now scroll down a bit and find
[UserPlayerUnit 1.Compartment X.CrewMemberSlotAdditionalRepository 1](again, substitute X with the previously found compartment number). Remove the bold part, so that it reads:
[UserPlayerUnit 1.Compartment X.CrewMemberSlot 1]. Scroll down even more and do the same for
[UserPlayerUnit 1.Compartment X.CrewMemberSlot 2]
4. Save the file, start up SH4 and see if it worked. If you got even the bow gunnerslots back, then you can use the procedure described in the post I linked at the beginning to get a stern gun.