Script was not running in same context