fixed a weird heisenbug; how did it work before??