Fixed some startup problems