Fix bug on wiew edit