add mutex lock to changing top blocks