fix initSnake method