Fixed my title issue and simplified my code by getting rid of the custom title context.