Added failed register function