Controlling relay and servo together

I checked all the grounds, they are connected. If the code in the function pertaining to relay is replaced with these lines, both relays are activated. That is why I am thinking it is something to do with the code, not the components and wiring.

digitalWrite (StbdFrelay, LOW);
digitalWrite (StbdRrelay, LOW);