Update to 1.8.0-beta.2
Fix registration test
Wait little before exiting to log exit reason
Fix variable declaration order