Fixed static scope in functions calls