fix a bug which will cause error in admin panel