added changes from https://github.com/geisters/active_admin/commit/efbe9061f71e756da59a0616eebf15af58305393