fix #521
refactor admin