fixed looping issue as much as possible