fixed a bug in /edit redirect.