Fixed bug that caused startup errors