Better method for locking on html update