fixed a problem with isPublic method