Added locks to ModelHost