Fixed InvalidId problem