fixed null pointer bug in admin