Fix undefined label issue on the edit page