fix startup sequence bug