Fixed the circular loading issue
Fixed unit testing