hack for registration race condition, and convert str to int