fixing infinite loop?

hopefully