some fixes and exiting when website is up