If you had a dark background and expose for the flash with a small aperture and fast enough shutter the ambient background exposure will result in black while the flash exposure can be perfect. This is a common mistake yet it can be used to your advantage.