fixed lock issues