Removed useless set, fixed lock statement