fixed troubles on ram/lock