Changed registration flag from variable to storage