Put some synchronisation or locking here, maybe?