fixed scope for myid var