Fix bugs on listing and editing