Fixed a critical bug in generic startup code.