fix bug where i didnt get resetted between loops