fix ruby lock