Fix bug in initialize mode