Fixes #5810 - fixes issue with incorrect page titles