calling root vars fixed

thanks to Fotiman from webmasterworld.com