logic fixes and variable added for page content