trying fix cycling problem