fixed register script