hopefully fixed the valid check in register info