fixed circular function call