bug fixes and changed normal storage format