fix hostname on Locks Function