Bug fixs for registration and batch test