finally fixed registration to work