added cursor lock