Event Locking code for Stats