fixed pocket detect feature, thanks to BindassDost