trying to fix weird async behavior