Fixed bug in startup sequence