fixed startup function