Solved cyclic reference bug and AKS problem