Was using wrong variable to retrieve begin keyword