improved test and fixed bugs with is_admin