fixed docroot check in beta_functions