(PDB-663) Fix foreground support

Signed-off-by: Ken Barber <ken@bob.sh>