Fixed register bug with previous bugfix