fixed registration script