fix thread issues and first success with layered frames