Moved locking code to after post to avoid missing data